import {request} from "../../request/index.js"
const app = getApp();

Page({
  data: {
    schemeList: [],
    text: '',
    text2: '',
    text3: '',
    startTime: '',
    line1: '',
    line2: '',
    line3: ''
  },
  onLoad(options){

    var schemeList = JSON.parse(options.scheme)
    schemeList.forEach(v => {
      schemeList = v
    })
    this.setData({
      schemeList,
      text: options.text,
      text2: options.text2,
      text3: options.text3,
      line1: options.line1,
      line2: options.line2,
      line3: options.line3
    })
  },
  gotoUpdateScheme(e) {
    console.log(e)
    var id = e.currentTarget.dataset.id
    wx.navigateTo({
      url: '/pages/updateScheme/updateScheme?id=' + id + '&text=' + this.data.text + '&text2=' + this.data.text2 + '&text3=' + this.data.text3 + '&line1=' + this.data.line1 + '&line2=' + this.data.line2 + '&line3=' + this.data.line3,
    })
  }
})